#ifndef __ZXING_H__
#define __ZXING_H__

#ifdef __cplusplus
extern "C" {
#endif

#ifdef ZXING_EXPORTS
#define ZXINGAPI __declspec(dllexport)
#else
#define ZXINGAPI __declspec(dllimport)
#endif

typedef enum ZXFormat
{
    ZXFormat_None = 0, 
    ZXFormat_QR_CODE,
    ZXFormat_DATA_MATRIX,
    ZXFormat_UPC_E,
    ZXFormat_UPC_A,
    ZXFormat_EAN_8,
    ZXFormat_EAN_13,
    ZXFormat_CODE_128,
    ZXFormat_CODE_39,
    ZXFormat_ITF,
    ZXFormat_AZTEC
} ZXFormat;

typedef struct tagZXResult
{
    ZXFormat format;
    char* text;
    int len;
    char* errText;
    int errlen;
} ZXResult;

ZXINGAPI ZXResult zxDecodeBitmap(unsigned char* grayData, int dataWidth, int dataHeight, int left, int top, int width, int height, unsigned int format, bool needErr);

#ifdef __cplusplus
}
#endif

#endif